KERNELDIR=/usr/src/kernel-headers-2.4.27-2-586tsc
CFLAGS=-DMODULE -D__KERNEL__ -DLINUX -Wall -O2 -isystem $(KERNELDIR)/include
CC=gcc
SOURCES=rbuffer.c buffops.c main.c
OBJECTS=$(SOURCES:.c=.o)
TARGET=fifo.o

$(TARGET): $(OBJECTS)
	ld -m elf_i386 -r $^ -o $@

-include .depend

all: $(TARGET)

clean:
	rm -f $(TARGET) $(OBJECTS) .depend

.depend: $(SOURCES) *.h
	$(CC) -MM $(SOURCES) > .depend

.PHONY: clean all

